<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>ROSS: core/instrumentation/ross-lps/analysis-lp.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <a href="https://github.com/ROSS-org/ROSS">
   <div id="projectname">ROSS
   </div>
   </a>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_af18cf245e3394ab3b436135935cfd6e.html">core</a></li><li class="navelem"><a class="el" href="dir_e8784b64d701200ce05334d46c95fd71.html">instrumentation</a></li><li class="navelem"><a class="el" href="dir_84641326219068642bc6dd10462c84c6.html">ross-lps</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">analysis-lp.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="analysis-lp_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="ross_8h.html">ross.h</a>&quot;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="analysis-lp_8h.html">analysis-lp.h</a>&quot;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;limits.h&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * The code for virtual time sampling is based off of the model-net sampling for</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * CODES network models</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="analysis-lp_8c.html#a59aaa23fb40396f2b16d7a7fc2d25367">st_create_sample_event</a>(<a class="code" href="structtw__lp.html">tw_lp</a> *lp);</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="analysis-lp_8h.html#ac43c559cd392cfd316e776c70b65c542">   13</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="analysis-lp_8c.html#ac43c559cd392cfd316e776c70b65c542">analysis_init</a>(<a class="code" href="structanalysis__state.html">analysis_state</a> *s, <a class="code" href="structtw__lp.html">tw_lp</a> *lp)</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;{</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <span class="keywordtype">int</span> i, j, idx = 0, sim_idx = 0;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <a class="code" href="structtw__lp.html">tw_lp</a> *cur_lp;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="comment">// set our id relative to all analysis LPs</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    s-&gt;<a class="code" href="structanalysis__state.html#a409d430940c80d1ff1e9353fb4d0ebad">analysis_id</a> = lp-&gt;<a class="code" href="structtw__lp.html#a3e75d9bf7796c16870ad686564ee4c20">gid</a> - <a class="code" href="analysis-lp_8h.html#aeebc1f1ebc57668642e5c1f32ad8789e">analysis_start_gid</a>;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;    s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a> = ceil((<span class="keywordtype">double</span>)<a class="code" href="ross-extern_8h.html#ab8bd876929690758e922961bcc16cd64">g_tw_nlp</a> / <a class="code" href="ross-extern_8h.html#a4a237c68db5a0325e986d3710088d427">g_tw_nkp</a>);</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="comment">// create list of LPs this is responsible for</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a> = (<a class="code" href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a>*)<a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;analysis LPs&quot;</span>, <span class="keyword">sizeof</span>(<a class="code" href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a>), s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a>);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    s-&gt;<a class="code" href="structanalysis__state.html#a87dc37f01bfce6b5f74d05317d33dde2">lp_list_sim</a> = (<a class="code" href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a>*)<a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;analysis LPs&quot;</span>, <span class="keyword">sizeof</span>(<a class="code" href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a>), s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a>);</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="comment">// size of lp_list is max number of LPs this analysis LP is responsible for</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="keywordflow">for</span> (i = 0; i &lt; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a>; i++)</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    {</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a>[i] = ULLONG_MAX;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        s-&gt;<a class="code" href="structanalysis__state.html#a87dc37f01bfce6b5f74d05317d33dde2">lp_list_sim</a>[i] = ULLONG_MAX;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    }</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keywordflow">for</span> (i = 0; (<span class="keywordtype">unsigned</span> int)i &lt; <a class="code" href="ross-extern_8h.html#ab8bd876929690758e922961bcc16cd64">g_tw_nlp</a>; i++)</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    {</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        cur_lp = <a class="code" href="ross-extern_8h.html#a43d0a4ccc4cb71f94675a4b64a7c60c0">g_tw_lp</a>[i];</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">if</span> (cur_lp-&gt;<a class="code" href="structtw__lp.html#a8028662b2668953fa9f49f2df7d00850">kp</a>-&gt;<a class="code" href="structtw__kp.html#afb056d26713ffb46913315b0d2f2651b">id</a> == s-&gt;<a class="code" href="structanalysis__state.html#a409d430940c80d1ff1e9353fb4d0ebad">analysis_id</a> % <a class="code" href="ross-extern_8h.html#a4a237c68db5a0325e986d3710088d427">g_tw_nkp</a>)</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        {</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            s-&gt;<a class="code" href="structanalysis__state.html#a87dc37f01bfce6b5f74d05317d33dde2">lp_list_sim</a>[sim_idx] = cur_lp-&gt;<a class="code" href="structtw__lp.html#a3e75d9bf7796c16870ad686564ee4c20">gid</a>;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            sim_idx++;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            <span class="comment">// check if this LP even needs sampling performed</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            <span class="keywordflow">if</span> (cur_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a> == NULL || cur_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a> == 0)</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;                <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a>[idx] = cur_lp-&gt;<a class="code" href="structtw__lp.html#a3e75d9bf7796c16870ad686564ee4c20">gid</a>;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            idx++;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        }</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    }</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="comment">// update num_lps</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a> = idx;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    s-&gt;<a class="code" href="structanalysis__state.html#a62446f0daa57e311bfdda276b577406c">num_lps_sim</a> = sim_idx;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="comment">// setup memory to use for model samples</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordflow">if</span> ((<a class="code" href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47a4bd4814759ab4c480ad9a352ac2b16a6">VT_STATS</a> || <a class="code" href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47afc9c4a97f2aa53e8f930d1b30dde8781">ALL_STATS</a>) &amp;&amp; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a> &gt; 0)</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a> = (<a class="code" href="structmodel__sample__data.html">model_sample_data</a>*) <a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;analysis LPs&quot;</span>, <span class="keyword">sizeof</span>(<a class="code" href="structmodel__sample__data.html">model_sample_data</a>), <a class="code" href="specialized-lps_8c.html#abed0f5fb27fb2a268739d215ef22180e">g_st_sample_count</a>);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        s-&gt;<a class="code" href="structanalysis__state.html#a360ffd7a3b26aba9c705af582dfc62bb">model_samples_current</a> = s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a>;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <a class="code" href="structmodel__sample__data.html">model_sample_data</a> *sample = s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a>;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="specialized-lps_8c.html#abed0f5fb27fb2a268739d215ef22180e">g_st_sample_count</a>; i++)</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        {</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            <span class="keywordflow">if</span> (i == 0)</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;            {</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a> = NULL;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = sample + 1;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a> = sample;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            }</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;            <span class="keywordflow">else</span> <span class="keywordflow">if</span> (i == g_st_sample_count - 1)</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = NULL;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                s-&gt;<a class="code" href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">model_samples_tail</a> = sample;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            }</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            {</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = sample + 1;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a> = sample;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            }</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            <span class="keywordflow">if</span> (s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a> &lt;= 0)</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                <a class="code" href="ross-extern_8h.html#a49ed2388aaae26e43280b7909c834aaa">tw_error</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;s-&gt;num_lps &lt;= 0!&quot;</span>);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            sample-&gt;<a class="code" href="structmodel__sample__data.html#a8749fe78d7fd06970185012b9e9f3209">lp_data</a> = (<span class="keywordtype">void</span>**) <a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;analysis LPs&quot;</span>, <span class="keyword">sizeof</span>(<span class="keywordtype">void</span>*), s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a>);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            <span class="keywordflow">for</span> (j = 0; j &lt; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a>; j++)</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;                cur_lp = <a class="code" href="ross-kernel-inline_8h.html#a3e5591d29e9db9c6a1a1cc19ed55feec">tw_getlocal_lp</a>(s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a>[j]);</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#a8749fe78d7fd06970185012b9e9f3209">lp_data</a>[j] = (<span class="keywordtype">void</span> *) <a class="code" href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a>(<a class="code" href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a>, <span class="stringliteral">&quot;analysis LPs&quot;</span>, cur_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a>, 1);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            }</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            sample = sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="comment">// schedule 1st sampling event</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="analysis-lp_8c.html#a59aaa23fb40396f2b16d7a7fc2d25367">st_create_sample_event</a>(lp);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;}</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="analysis-lp_8h.html#ad74eeee6fcd09d61e982a87d59473a61">   94</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="analysis-lp_8c.html#ad74eeee6fcd09d61e982a87d59473a61">analysis_event</a>(<a class="code" href="structanalysis__state.html">analysis_state</a> *s, <a class="code" href="structtw__bf.html">tw_bf</a> *bf, <a class="code" href="structanalysis__msg.html">analysis_msg</a> *m, <a class="code" href="structtw__lp.html">tw_lp</a> *lp)</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;{</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordtype">int</span> i;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <a class="code" href="structtw__lp.html">tw_lp</a> *model_lp;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    lp-&gt;<a class="code" href="structtw__lp.html#a9fd32632e5c45a00faf16a6fd0814640">pe</a>-&gt;<a class="code" href="structtw__pe.html#ac1d26b7bfd058cc55cbf5ee201edb83c">stats</a>.<a class="code" href="structtw__statistics.html#a1db8c3a6135984960c5b7da410770cf5">s_alp_nevent_processed</a>++; <span class="comment">//don&#39;t undo in RC</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">if</span> ((<a class="code" href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47a4bd4814759ab4c480ad9a352ac2b16a6">VT_STATS</a> || <a class="code" href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47afc9c4a97f2aa53e8f930d1b30dde8781">ALL_STATS</a>) &amp;&amp; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a> &gt; 0)</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    {</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <a class="code" href="structmodel__sample__data.html">model_sample_data</a> *sample = s-&gt;<a class="code" href="structanalysis__state.html#a360ffd7a3b26aba9c705af582dfc62bb">model_samples_current</a>;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="comment">// TODO handle this situation better</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">if</span> (sample == s-&gt;<a class="code" href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">model_samples_tail</a>)</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            printf(<span class="stringliteral">&quot;WARNING: last available sample space for analysis lp!\n&quot;</span>);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        sample-&gt;<a class="code" href="structmodel__sample__data.html#af3c7076d05572831c8b7fe844a46b7aa">timestamp</a> = <a class="code" href="ross-kernel-inline_8h.html#a543cb527662432d81f65c327e5e5f1b0">tw_now</a>(lp);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        m-&gt;<a class="code" href="structanalysis__msg.html#ab0734d7472194e3110f01c06ec222803">timestamp</a> = <a class="code" href="ross-kernel-inline_8h.html#a543cb527662432d81f65c327e5e5f1b0">tw_now</a>(lp);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="comment">// call the model sampling function for each LP on this KP</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordflow">for</span> (i = 0; i &lt; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a>; i++)</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;            <span class="keywordflow">if</span> (s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a>[i] == ULLONG_MAX)</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            model_lp = <a class="code" href="ross-kernel-inline_8h.html#a3e5591d29e9db9c6a1a1cc19ed55feec">tw_getlocal_lp</a>(s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a>[i]);</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            <span class="keywordflow">if</span> (model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a> == NULL || model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a> == 0)</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;            model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a2961fa7f1d81ff16b861217b9b2b75cc">sample_event_fn</a>(model_lp-&gt;<a class="code" href="structtw__lp.html#a34fb8e673f23705156b2473503e8a2d5">cur_state</a>, bf, lp, sample-&gt;<a class="code" href="structmodel__sample__data.html#a8749fe78d7fd06970185012b9e9f3209">lp_data</a>[i]);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        }</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        s-&gt;<a class="code" href="structanalysis__state.html#a360ffd7a3b26aba9c705af582dfc62bb">model_samples_current</a> = s-&gt;<a class="code" href="structanalysis__state.html#a360ffd7a3b26aba9c705af582dfc62bb">model_samples_current</a>-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    }</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="comment">// sim engine sampling</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="ross-extern_8h.html#ae22db4d4e754eff64535402f5fa60a5f">g_tw_synchronization_protocol</a> != <a class="code" href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fda6b834d43476553e583e0fde6578c82f0">SEQUENTIAL</a> &amp;&amp;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            (<a class="code" href="st-instrumentation_8c.html#aa6002a27f9236e4d9c61090a247341f5">g_st_engine_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47a4bd4814759ab4c480ad9a352ac2b16a6">VT_STATS</a> || <a class="code" href="st-instrumentation_8c.html#aa6002a27f9236e4d9c61090a247341f5">g_st_engine_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47afc9c4a97f2aa53e8f930d1b30dde8781">ALL_STATS</a>))</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">#ifdef USE_DAMARIS</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor"></span>        <span class="keywordflow">if</span> (g_st_damaris_enabled)</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            st_damaris_expose_data(lp-&gt;<a class="code" href="structtw__lp.html#a9fd32632e5c45a00faf16a6fd0814640">pe</a>, <a class="code" href="ross-kernel-inline_8h.html#a543cb527662432d81f65c327e5e5f1b0">tw_now</a>(lp), <a class="code" href="st-instrumentation_8h.html#a62e322fd5fc534ed1f671bfcae80f21fa0bfba3b728463b2ee027b64c81b96011">ANALYSIS_LP</a>);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;            <a class="code" href="st-instrumentation_8h.html#a6ae8d8f288de23fd6a4d9d3c8a7b296a">st_collect_engine_data</a>(lp-&gt;<a class="code" href="structtw__lp.html#a9fd32632e5c45a00faf16a6fd0814640">pe</a>, <a class="code" href="st-instrumentation_8h.html#a62e322fd5fc534ed1f671bfcae80f21fa0bfba3b728463b2ee027b64c81b96011">ANALYSIS_LP</a>);</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="preprocessor"></span>        <a class="code" href="st-instrumentation_8h.html#a6ae8d8f288de23fd6a4d9d3c8a7b296a">st_collect_engine_data</a>(lp-&gt;<a class="code" href="structtw__lp.html#a9fd32632e5c45a00faf16a6fd0814640">pe</a>, <a class="code" href="st-instrumentation_8h.html#a62e322fd5fc534ed1f671bfcae80f21fa0bfba3b728463b2ee027b64c81b96011">ANALYSIS_LP</a>);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="preprocessor"></span>    }</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        <span class="comment">//collect_sim_engine_data(lp-&gt;pe, lp, s, (tw_stime) tw_clock_read() / g_tw_clock_rate);</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <span class="comment">// create next sampling event</span></div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <a class="code" href="analysis-lp_8c.html#a59aaa23fb40396f2b16d7a7fc2d25367">st_create_sample_event</a>(lp);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;}</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="analysis-lp_8h.html#a37b28475849748f0a7b6429a56dc4478">  146</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="analysis-lp_8c.html#a37b28475849748f0a7b6429a56dc4478">analysis_event_rc</a>(<a class="code" href="structanalysis__state.html">analysis_state</a> *s, <a class="code" href="structtw__bf.html">tw_bf</a> *bf, <a class="code" href="structanalysis__msg.html">analysis_msg</a> *m, <a class="code" href="structtw__lp.html">tw_lp</a> *lp)</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;{</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <a class="code" href="structtw__lp.html">tw_lp</a> *model_lp;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keywordtype">int</span> j;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    lp-&gt;<a class="code" href="structtw__lp.html#a9fd32632e5c45a00faf16a6fd0814640">pe</a>-&gt;<a class="code" href="structtw__pe.html#ac1d26b7bfd058cc55cbf5ee201edb83c">stats</a>.<a class="code" href="structtw__statistics.html#ad1861e30cfc3845812bb008f7d419308">s_alp_e_rbs</a>++;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="keywordflow">if</span> ((<a class="code" href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47a4bd4814759ab4c480ad9a352ac2b16a6">VT_STATS</a> || <a class="code" href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47afc9c4a97f2aa53e8f930d1b30dde8781">ALL_STATS</a>) &amp;&amp; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a> &gt; 0)</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    {</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="comment">// need to remove sample associated with this event from the list</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <a class="code" href="structmodel__sample__data.html">model_sample_data</a> *sample;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="comment">// start at end, because it&#39;s most likely closer to the timestamp we&#39;re looking for</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        <span class="keywordflow">for</span> (sample = s-&gt;<a class="code" href="structanalysis__state.html#a360ffd7a3b26aba9c705af582dfc62bb">model_samples_current</a>-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>; sample != NULL; sample = sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>)</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        {</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            <span class="comment">//sample = &amp;s-&gt;model_samples[i];</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="ross_8h.html#a650bdf282bba8368dd3325bed7e12abc">TW_STIME_CMP</a>(sample-&gt;<a class="code" href="structmodel__sample__data.html#af3c7076d05572831c8b7fe844a46b7aa">timestamp</a>, m-&gt;<a class="code" href="structanalysis__msg.html#ab0734d7472194e3110f01c06ec222803">timestamp</a>) == 0)</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;            {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;                <span class="keywordflow">for</span> (j = 0; j &lt; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a>; j++)</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;                {</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                    <span class="keywordflow">if</span> (s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a>[j] == ULLONG_MAX)</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;                        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;                    <span class="comment">// first call the appropriate RC fn, to allow it to undo any state changes</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;                    model_lp = <a class="code" href="ross-kernel-inline_8h.html#a3e5591d29e9db9c6a1a1cc19ed55feec">tw_getlocal_lp</a>(s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a>[j]);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;                    <span class="keywordflow">if</span> (model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a> == NULL || model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a> == 0)</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;                        <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;                    model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a46fdb5687b9f7dc2d08afaa99f0a32f6">sample_revent_fn</a>(model_lp-&gt;<a class="code" href="structtw__lp.html#a34fb8e673f23705156b2473503e8a2d5">cur_state</a>, bf, lp, sample-&gt;<a class="code" href="structmodel__sample__data.html#a8749fe78d7fd06970185012b9e9f3209">lp_data</a>[j]);</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;                }</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#af3c7076d05572831c8b7fe844a46b7aa">timestamp</a> = <a class="code" href="ross_8h.html#a273c2f3e8e704f34d62888aa26e61d73">TW_STIME_CRT</a>(0);</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;                <span class="keywordflow">if</span> (sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>)</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;                <span class="keywordflow">if</span> (sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>)</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a> = sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>;</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;                <span class="keywordflow">if</span> (s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a> == sample)</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;                    s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a> = sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;                <span class="keywordflow">if</span> (s-&gt;<a class="code" href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">model_samples_tail</a> != sample)</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;                { <span class="comment">// move this freed sample to the end of the list, so we don&#39;t have a memory leak</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a> = s-&gt;<a class="code" href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">model_samples_tail</a>;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = sample;</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = NULL;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;                    s-&gt;<a class="code" href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">model_samples_tail</a> = sample;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;                }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            }</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    }</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;}</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="analysis-lp_8h.html#a2c7b0d1be345dd9f6fc505cccda45958">  199</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="analysis-lp_8c.html#a2c7b0d1be345dd9f6fc505cccda45958">analysis_commit</a>(<a class="code" href="structanalysis__state.html">analysis_state</a> *s, <a class="code" href="structtw__bf.html">tw_bf</a> *bf, <a class="code" href="structanalysis__msg.html">analysis_msg</a> *m, <a class="code" href="structtw__lp.html">tw_lp</a> *lp)</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;{</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    (void) bf;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    (void) lp;</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    <span class="keywordflow">if</span> ((<a class="code" href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47a4bd4814759ab4c480ad9a352ac2b16a6">VT_STATS</a> || <a class="code" href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a> == <a class="code" href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47afc9c4a97f2aa53e8f930d1b30dde8781">ALL_STATS</a>) &amp;&amp; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a> &gt; 0)</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="comment">// write committed data to buffer</span></div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        <a class="code" href="structmodel__sample__data.html">model_sample_data</a> *sample;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        <span class="keywordtype">int</span> j;</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <a class="code" href="structtw__lp.html">tw_lp</a> *model_lp;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <a class="code" href="structlp__metadata.html">lp_metadata</a> metadata;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        <span class="comment">// start at beginning</span></div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <span class="keywordflow">for</span> (sample = s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a>; sample != NULL; sample = sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>)</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        {</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;            <span class="keywordflow">if</span> (<a class="code" href="ross_8h.html#a650bdf282bba8368dd3325bed7e12abc">TW_STIME_CMP</a>(sample-&gt;<a class="code" href="structmodel__sample__data.html#af3c7076d05572831c8b7fe844a46b7aa">timestamp</a>, m-&gt;<a class="code" href="structanalysis__msg.html#ab0734d7472194e3110f01c06ec222803">timestamp</a>) == 0)</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            {</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;                <span class="keywordflow">for</span> (j = 0; j &lt; s-&gt;<a class="code" href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">num_lps</a>; j++)</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;                {</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                    model_lp = <a class="code" href="ross-kernel-inline_8h.html#a3e5591d29e9db9c6a1a1cc19ed55feec">tw_getlocal_lp</a>(s-&gt;<a class="code" href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">lp_list</a>[j]);</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                    <span class="keywordflow">if</span> (model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a> == NULL || model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a> == 0)</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                        <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                    metadata.<a class="code" href="structlp__metadata.html#a04c8225b86d7d53b5335b8b3a6207430">lpid</a> = model_lp-&gt;<a class="code" href="structtw__lp.html#a3e75d9bf7796c16870ad686564ee4c20">gid</a>;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;                    metadata.<a class="code" href="structlp__metadata.html#ad7ec46d0315607ba9511e844fd8c0b07">kpid</a> = model_lp-&gt;<a class="code" href="structtw__lp.html#a8028662b2668953fa9f49f2df7d00850">kp</a>-&gt;<a class="code" href="structtw__kp.html#afb056d26713ffb46913315b0d2f2651b">id</a>;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                    metadata.<a class="code" href="structlp__metadata.html#af5543da59d862d25d30f11993fb45a17">peid</a> = model_lp-&gt;<a class="code" href="structtw__lp.html#a9fd32632e5c45a00faf16a6fd0814640">pe</a>-&gt;<a class="code" href="structtw__pe.html#a8a57f2123eddf6a195d82ecc781093e6">id</a>;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                    metadata.<a class="code" href="structlp__metadata.html#aec297d31062cfc94c30f4e46162c9845">ts</a> = m-&gt;<a class="code" href="structanalysis__msg.html#ab0734d7472194e3110f01c06ec222803">timestamp</a>;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                    metadata.<a class="code" href="structlp__metadata.html#a7630858a858eb1e11c17758be11fcf0e">sample_sz</a> = model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a>;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;                    metadata.<a class="code" href="structlp__metadata.html#ad343a509c2c79cf1576caa77925cbbf1">flag</a> = <a class="code" href="st-instrumentation_8h.html#a1418b1c212e8b79f85697aa339baa0daa654ff0530bfa70796117e80a97270206">MODEL_TYPE</a>;</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;                    <span class="keywordtype">char</span> buffer[<span class="keyword">sizeof</span>(<a class="code" href="analysis-lp_8h.html#a73105609b6fa4e69608d01c498e91d7f">lp_metadata</a>) + model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a>];</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;                    memcpy(&amp;buffer[0], (<span class="keywordtype">char</span>*)&amp;metadata, <span class="keyword">sizeof</span>(<a class="code" href="analysis-lp_8h.html#a73105609b6fa4e69608d01c498e91d7f">lp_metadata</a>));</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                    memcpy(&amp;buffer[<span class="keyword">sizeof</span>(<a class="code" href="structlp__metadata.html">lp_metadata</a>)], (<span class="keywordtype">char</span>*)sample-&gt;<a class="code" href="structmodel__sample__data.html#a8749fe78d7fd06970185012b9e9f3209">lp_data</a>[j], model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a>);</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                    <span class="keywordflow">if</span> (<a class="code" href="ross-extern_8h.html#ae22db4d4e754eff64535402f5fa60a5f">g_tw_synchronization_protocol</a> != <a class="code" href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fda6b834d43476553e583e0fde6578c82f0">SEQUENTIAL</a>)</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;                        <a class="code" href="st-instrumentation_8h.html#a726b5dd5323e5d253e35d7fff164e6a5">st_buffer_push</a>(<a class="code" href="st-instrumentation_8h.html#a62e322fd5fc534ed1f671bfcae80f21fa0bfba3b728463b2ee027b64c81b96011">ANALYSIS_LP</a>, &amp;buffer[0], <span class="keyword">sizeof</span>(<a class="code" href="structlp__metadata.html">lp_metadata</a>) + model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a>);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="ross-extern_8h.html#ae22db4d4e754eff64535402f5fa60a5f">g_tw_synchronization_protocol</a> == <a class="code" href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fda6b834d43476553e583e0fde6578c82f0">SEQUENTIAL</a> &amp;&amp; !<a class="code" href="st-instrumentation_8c.html#aa9d73558c451caac8d15fdbff04f42cc">g_st_disable_out</a>)</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                        fwrite(buffer, <span class="keyword">sizeof</span>(<a class="code" href="structlp__metadata.html">lp_metadata</a>) + model_lp-&gt;<a class="code" href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">model_types</a>-&gt;<a class="code" href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">sample_struct_sz</a>, 1, <a class="code" href="st-instrumentation_8h.html#a729f18614571dcca273498b46b86d98f">seq_analysis</a>);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                }</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                sample-&gt;<a class="code" href="structmodel__sample__data.html#af3c7076d05572831c8b7fe844a46b7aa">timestamp</a> = <a class="code" href="ross_8h.html#a273c2f3e8e704f34d62888aa26e61d73">TW_STIME_CRT</a>(0);</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                <span class="keywordflow">if</span> (sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>)</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>;</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                <span class="keywordflow">if</span> (sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>)</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a> = sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>;</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                <span class="keywordflow">if</span> (s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a> == sample)</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                    s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a> = sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a>;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                <span class="keywordflow">if</span> (s-&gt;<a class="code" href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">model_samples_tail</a> != sample)</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                { <span class="comment">// move this freed sample to the end of the list, so we don&#39;t have a memory leak</span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a> = s-&gt;<a class="code" href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">model_samples_tail</a>;</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">prev</a>-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = sample;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                    sample-&gt;<a class="code" href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">next</a> = NULL;</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                    s-&gt;<a class="code" href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">model_samples_tail</a> = sample;</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                }</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        }</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    }</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;}</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div>
<div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="analysis-lp_8h.html#ab7226e31f94e673406eba4e8c2edd7a8">  258</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="analysis-lp_8c.html#ab7226e31f94e673406eba4e8c2edd7a8">analysis_finish</a>(<a class="code" href="structanalysis__state.html">analysis_state</a> *s, <a class="code" href="structtw__lp.html">tw_lp</a> *lp)</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;{</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    (void) lp;</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;    <span class="comment">// TODO all samples should be written by the commit function, right?</span></div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    <span class="comment">// Does anything actually need to be done here?</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    <span class="keywordflow">if</span> (s-&gt;<a class="code" href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">model_samples_head</a> != s-&gt;<a class="code" href="structanalysis__state.html#a360ffd7a3b26aba9c705af582dfc62bb">model_samples_current</a>)</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        printf(<span class="stringliteral">&quot;WARNING: there is model sample data that has not been committed!\n&quot;</span>);</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;}</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div>
<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="analysis-lp_8c.html#a59aaa23fb40396f2b16d7a7fc2d25367">  267</a></span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="analysis-lp_8c.html#a59aaa23fb40396f2b16d7a7fc2d25367">st_create_sample_event</a>(<a class="code" href="structtw__lp.html">tw_lp</a> *lp)</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;{</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="ross_8h.html#a096f73feb08316896d644277b486c9ea">TW_STIME_DBL</a>(<a class="code" href="ross-kernel-inline_8h.html#a543cb527662432d81f65c327e5e5f1b0">tw_now</a>(lp)) + <a class="code" href="st-instrumentation_8c.html#a6982ecdc2a19a8aea84288e5c94e97b3">g_st_vt_interval</a> &lt;= <a class="code" href="st-instrumentation_8c.html#a755f4a9e3b876ebc32861b30f7d90780">g_st_sampling_end</a>)</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    {</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        <a class="code" href="structtw__event.html">tw_event</a> *e = <a class="code" href="ross-inline_8h.html#a6e55304c545600c2bb996fa70dd43f05">tw_event_new</a>(lp-&gt;<a class="code" href="structtw__lp.html#a3e75d9bf7796c16870ad686564ee4c20">gid</a>,<a class="code" href="ross_8h.html#a273c2f3e8e704f34d62888aa26e61d73">TW_STIME_CRT</a>(<a class="code" href="st-instrumentation_8c.html#a6982ecdc2a19a8aea84288e5c94e97b3">g_st_vt_interval</a>), lp);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <a class="code" href="structanalysis__msg.html">analysis_msg</a> *m = (<a class="code" href="structanalysis__msg.html">analysis_msg</a>*) <a class="code" href="ross-extern_8h.html#a3def69f148eaba619b26c898c90687b8">tw_event_data</a>(e);</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        m-&gt;<a class="code" href="structanalysis__msg.html#a1f869bb7e5b6f38acc3000cd853d0901">src</a> = lp-&gt;<a class="code" href="structtw__lp.html#a3e75d9bf7796c16870ad686564ee4c20">gid</a>;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        <a class="code" href="ross-extern_8h.html#ad057802273cd99b0e039da1ba15080ac">tw_event_send</a>(e);</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    }</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;}</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;<span class="comment"> * any specialized ROSS LP should be hidden from the model</span></div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;<span class="comment"> * need to add in these LP after all model LPs</span></div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00282"></a><span class="lineno"><a class="line" href="analysis-lp_8h.html#ad1769c6d24a1685cf6a56dea0c851c91">  282</a></span>&#160;<a class="code" href="ross_8h.html#a1ec2e3807f66c4270f47acb0e555a519">tw_peid</a> <a class="code" href="analysis-lp_8c.html#ad1769c6d24a1685cf6a56dea0c851c91">analysis_map</a>(<a class="code" href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a> gid)</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;{</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <a class="code" href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a> local_id = gid - <a class="code" href="analysis-lp_8h.html#aeebc1f1ebc57668642e5c1f32ad8789e">analysis_start_gid</a>;</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    <span class="keywordflow">return</span> local_id / <a class="code" href="ross-extern_8h.html#a4a237c68db5a0325e986d3710088d427">g_tw_nkp</a>; <span class="comment">// because there is 1 LP for each KP</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;}</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div>
<div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="analysis-lp_8c.html#ab8973a3b6409eef24755915fda01a193">  288</a></span>&#160;<a class="code" href="structtw__lptype.html">tw_lptype</a> <a class="code" href="analysis-lp_8c.html#ab8973a3b6409eef24755915fda01a193">analysis_lp</a>[] = {</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;        {(<a class="code" href="ross-types_8h.html#aac61902297f5fb4a64df1e5139b14635">init_f</a>) <a class="code" href="analysis-lp_8c.html#ac43c559cd392cfd316e776c70b65c542">analysis_init</a>,</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;     (<a class="code" href="ross-types_8h.html#a00a92238994982e5b35fdb11bb058b61">pre_run_f</a>) NULL,</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;         (<a class="code" href="ross-types_8h.html#a04b9baf15ecd297935e1cf749bcaa1ef">event_f</a>) <a class="code" href="analysis-lp_8c.html#ad74eeee6fcd09d61e982a87d59473a61">analysis_event</a>,</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;         (<a class="code" href="ross-types_8h.html#a622b543188d8cf3c6c7d03d4a8f688a8">revent_f</a>) <a class="code" href="analysis-lp_8c.html#a37b28475849748f0a7b6429a56dc4478">analysis_event_rc</a>,</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;         (<a class="code" href="ross-types_8h.html#abf9562d002530fb837843fd3f237dcd5">commit_f</a>) <a class="code" href="analysis-lp_8c.html#a2c7b0d1be345dd9f6fc505cccda45958">analysis_commit</a>,</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;         (<a class="code" href="ross-types_8h.html#accdac06fd09ac539061af06d529fe467">final_f</a>) <a class="code" href="analysis-lp_8c.html#ab7226e31f94e673406eba4e8c2edd7a8">analysis_finish</a>,</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;         (<a class="code" href="ross-types_8h.html#a62f872bac026a0bc42f4b64bb93c250e">map_f</a>) <a class="code" href="analysis-lp_8c.html#ad1769c6d24a1685cf6a56dea0c851c91">analysis_map</a>,</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        <span class="keyword">sizeof</span>(<a class="code" href="structanalysis__state.html">analysis_state</a>)},</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;        {0},</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;};</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div>
<div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="analysis-lp_8h.html#ab8d22436238dae63d882069cad4d637e">  300</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="analysis-lp_8c.html#ab8d22436238dae63d882069cad4d637e">st_analysis_lp_settype</a>(<a class="code" href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a> lpid)</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;{</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    <a class="code" href="ross-extern_8h.html#a5b2b3253aadb60150d25a882ba8b22e9">tw_lp_settype</a>(lpid, &amp;analysis_lp[0]);</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;}</div>
<div class="ttc" id="structlp__metadata_html_af5543da59d862d25d30f11993fb45a17"><div class="ttname"><a href="structlp__metadata.html#af5543da59d862d25d30f11993fb45a17">lp_metadata::peid</a></div><div class="ttdeci">tw_peid peid</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00030">analysis-lp.h:30</a></div></div>
<div class="ttc" id="ross-extern_8h_html_ae22db4d4e754eff64535402f5fa60a5f"><div class="ttname"><a href="ross-extern_8h.html#ae22db4d4e754eff64535402f5fa60a5f">g_tw_synchronization_protocol</a></div><div class="ttdeci">tw_synch g_tw_synchronization_protocol</div><div class="ttdef"><b>Definition:</b> <a href="ross-global_8c_source.html#l00018">ross-global.c:18</a></div></div>
<div class="ttc" id="ross-extern_8h_html_afffdf140f2c492f61546ad783833f127"><div class="ttname"><a href="ross-extern_8h.html#afffdf140f2c492f61546ad783833f127">TW_LOC</a></div><div class="ttdeci">#define TW_LOC</div><div class="ttdef"><b>Definition:</b> <a href="ross-extern_8h_source.html#l00164">ross-extern.h:164</a></div></div>
<div class="ttc" id="structlp__metadata_html_ad343a509c2c79cf1576caa77925cbbf1"><div class="ttname"><a href="structlp__metadata.html#ad343a509c2c79cf1576caa77925cbbf1">lp_metadata::flag</a></div><div class="ttdeci">int flag</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00034">analysis-lp.h:34</a></div></div>
<div class="ttc" id="analysis-lp_8h_html_aeebc1f1ebc57668642e5c1f32ad8789e"><div class="ttname"><a href="analysis-lp_8h.html#aeebc1f1ebc57668642e5c1f32ad8789e">analysis_start_gid</a></div><div class="ttdeci">tw_lpid analysis_start_gid</div><div class="ttdef"><b>Definition:</b> <a href="specialized-lps_8c_source.html#l00015">specialized-lps.c:15</a></div></div>
<div class="ttc" id="structmodel__sample__data_html"><div class="ttname"><a href="structmodel__sample__data.html">model_sample_data</a></div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00037">analysis-lp.h:37</a></div></div>
<div class="ttc" id="analysis-lp_8c_html_ac43c559cd392cfd316e776c70b65c542"><div class="ttname"><a href="analysis-lp_8c.html#ac43c559cd392cfd316e776c70b65c542">analysis_init</a></div><div class="ttdeci">void analysis_init(analysis_state *s, tw_lp *lp)</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00013">analysis-lp.c:13</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a43d0a4ccc4cb71f94675a4b64a7c60c0"><div class="ttname"><a href="ross-extern_8h.html#a43d0a4ccc4cb71f94675a4b64a7c60c0">g_tw_lp</a></div><div class="ttdeci">tw_lp ** g_tw_lp</div><div class="ttdef"><b>Definition:</b> <a href="ross-global_8c_source.html#l00026">ross-global.c:26</a></div></div>
<div class="ttc" id="ross_8h_html_a273c2f3e8e704f34d62888aa26e61d73"><div class="ttname"><a href="ross_8h.html#a273c2f3e8e704f34d62888aa26e61d73">TW_STIME_CRT</a></div><div class="ttdeci">#define TW_STIME_CRT(x)</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00152">ross.h:152</a></div></div>
<div class="ttc" id="structlp__metadata_html"><div class="ttname"><a href="structlp__metadata.html">lp_metadata</a></div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00026">analysis-lp.h:26</a></div></div>
<div class="ttc" id="structst__model__types_html_a07ab63db6f5e4da71dbdb8a570cce113"><div class="ttname"><a href="structst__model__types.html#a07ab63db6f5e4da71dbdb8a570cce113">st_model_types::sample_struct_sz</a></div><div class="ttdeci">size_t sample_struct_sz</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00227">st-instrumentation.h:227</a></div></div>
<div class="ttc" id="analysis-lp_8c_html_ad1769c6d24a1685cf6a56dea0c851c91"><div class="ttname"><a href="analysis-lp_8c.html#ad1769c6d24a1685cf6a56dea0c851c91">analysis_map</a></div><div class="ttdeci">tw_peid analysis_map(tw_lpid gid)</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00282">analysis-lp.c:282</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a49ed2388aaae26e43280b7909c834aaa"><div class="ttname"><a href="ross-extern_8h.html#a49ed2388aaae26e43280b7909c834aaa">tw_error</a></div><div class="ttdeci">void tw_error(const char *file, int line, const char *fmt,...) NORETURN</div><div class="ttdef"><b>Definition:</b> <a href="tw-util_8c_source.html#l00074">tw-util.c:74</a></div></div>
<div class="ttc" id="structanalysis__state_html_a360ffd7a3b26aba9c705af582dfc62bb"><div class="ttname"><a href="structanalysis__state.html#a360ffd7a3b26aba9c705af582dfc62bb">analysis_state::model_samples_current</a></div><div class="ttdeci">model_sample_data * model_samples_current</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00053">analysis-lp.h:53</a></div></div>
<div class="ttc" id="st-instrumentation_8h_html_a2a5b594b0675d6ec442baf16bbacdd47afc9c4a97f2aa53e8f930d1b30dde8781"><div class="ttname"><a href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47afc9c4a97f2aa53e8f930d1b30dde8781">ALL_STATS</a></div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00235">st-instrumentation.h:235</a></div></div>
<div class="ttc" id="structtw__pe_html_ac1d26b7bfd058cc55cbf5ee201edb83c"><div class="ttname"><a href="structtw__pe.html#ac1d26b7bfd058cc55cbf5ee201edb83c">tw_pe::stats</a></div><div class="ttdeci">tw_statistics stats</div><div class="ttdoc">per PE counters </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00415">ross-types.h:415</a></div></div>
<div class="ttc" id="analysis-lp_8h_html_a73105609b6fa4e69608d01c498e91d7f"><div class="ttname"><a href="analysis-lp_8h.html#a73105609b6fa4e69608d01c498e91d7f">lp_metadata</a></div><div class="ttdeci">struct lp_metadata lp_metadata</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00009">analysis-lp.h:9</a></div></div>
<div class="ttc" id="st-instrumentation_8h_html_a726b5dd5323e5d253e35d7fff164e6a5"><div class="ttname"><a href="st-instrumentation_8h.html#a726b5dd5323e5d253e35d7fff164e6a5">st_buffer_push</a></div><div class="ttdeci">void st_buffer_push(int type, char *data, int size)</div><div class="ttdef"><b>Definition:</b> <a href="st-stats-buffer_8c_source.html#l00100">st-stats-buffer.c:100</a></div></div>
<div class="ttc" id="structanalysis__msg_html_a1f869bb7e5b6f38acc3000cd853d0901"><div class="ttname"><a href="structanalysis__msg.html#a1f869bb7e5b6f38acc3000cd853d0901">analysis_msg::src</a></div><div class="ttdeci">tw_lpid src</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00021">analysis-lp.h:21</a></div></div>
<div class="ttc" id="structanalysis__state_html_a62446f0daa57e311bfdda276b577406c"><div class="ttname"><a href="structanalysis__state.html#a62446f0daa57e311bfdda276b577406c">analysis_state::num_lps_sim</a></div><div class="ttdeci">int num_lps_sim</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00049">analysis-lp.h:49</a></div></div>
<div class="ttc" id="st-instrumentation_8c_html_aa6002a27f9236e4d9c61090a247341f5"><div class="ttname"><a href="st-instrumentation_8c.html#aa6002a27f9236e4d9c61090a247341f5">g_st_engine_stats</a></div><div class="ttdeci">int g_st_engine_stats</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8c_source.html#l00012">st-instrumentation.c:12</a></div></div>
<div class="ttc" id="analysis-lp_8c_html_ad74eeee6fcd09d61e982a87d59473a61"><div class="ttname"><a href="analysis-lp_8c.html#ad74eeee6fcd09d61e982a87d59473a61">analysis_event</a></div><div class="ttdeci">void analysis_event(analysis_state *s, tw_bf *bf, analysis_msg *m, tw_lp *lp)</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00094">analysis-lp.c:94</a></div></div>
<div class="ttc" id="ross-types_8h_html_a04b9baf15ecd297935e1cf749bcaa1ef"><div class="ttname"><a href="ross-types_8h.html#a04b9baf15ecd297935e1cf749bcaa1ef">event_f</a></div><div class="ttdeci">void(* event_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00077">ross-types.h:77</a></div></div>
<div class="ttc" id="analysis-lp_8c_html_ab7226e31f94e673406eba4e8c2edd7a8"><div class="ttname"><a href="analysis-lp_8c.html#ab7226e31f94e673406eba4e8c2edd7a8">analysis_finish</a></div><div class="ttdeci">void analysis_finish(analysis_state *s, tw_lp *lp)</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00258">analysis-lp.c:258</a></div></div>
<div class="ttc" id="ross-extern_8h_html_ab8bd876929690758e922961bcc16cd64"><div class="ttname"><a href="ross-extern_8h.html#ab8bd876929690758e922961bcc16cd64">g_tw_nlp</a></div><div class="ttdeci">tw_lpid g_tw_nlp</div><div class="ttdef"><b>Definition:</b> <a href="ross-global_8c_source.html#l00023">ross-global.c:23</a></div></div>
<div class="ttc" id="structmodel__sample__data_html_af3c7076d05572831c8b7fe844a46b7aa"><div class="ttname"><a href="structmodel__sample__data.html#af3c7076d05572831c8b7fe844a46b7aa">model_sample_data::timestamp</a></div><div class="ttdeci">tw_stime timestamp</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00041">analysis-lp.h:41</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a5b2b3253aadb60150d25a882ba8b22e9"><div class="ttname"><a href="ross-extern_8h.html#a5b2b3253aadb60150d25a882ba8b22e9">tw_lp_settype</a></div><div class="ttdeci">void tw_lp_settype(tw_lpid lp, tw_lptype *type)</div><div class="ttdef"><b>Definition:</b> <a href="tw-lp_8c_source.html#l00038">tw-lp.c:38</a></div></div>
<div class="ttc" id="structanalysis__state_html_a3a8c5d8d51f2f266dfb963c99dc6e143"><div class="ttname"><a href="structanalysis__state.html#a3a8c5d8d51f2f266dfb963c99dc6e143">analysis_state::num_lps</a></div><div class="ttdeci">int num_lps</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00048">analysis-lp.h:48</a></div></div>
<div class="ttc" id="structanalysis__state_html"><div class="ttname"><a href="structanalysis__state.html">analysis_state</a></div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00045">analysis-lp.h:45</a></div></div>
<div class="ttc" id="ross_8h_html_a911515dff2fb79886a16ed44df5f9d20"><div class="ttname"><a href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a></div><div class="ttdeci">uint64_t tw_lpid</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00160">ross.h:160</a></div></div>
<div class="ttc" id="structtw__lptype_html"><div class="ttname"><a href="structtw__lptype.html">tw_lptype</a></div><div class="ttdoc">Function Pointers for ROSS Event Handlers. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00087">ross-types.h:87</a></div></div>
<div class="ttc" id="structtw__lp_html_a8028662b2668953fa9f49f2df7d00850"><div class="ttname"><a href="structtw__lp.html#a8028662b2668953fa9f49f2df7d00850">tw_lp::kp</a></div><div class="ttdeci">tw_kp * kp</div><div class="ttdoc">kp – Kernel process that we belong to (must match pe). </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00313">ross-types.h:313</a></div></div>
<div class="ttc" id="structtw__event_html"><div class="ttname"><a href="structtw__event.html">tw_event</a></div><div class="ttdoc">Event Stucture. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00250">ross-types.h:250</a></div></div>
<div class="ttc" id="ross-types_8h_html_a62f872bac026a0bc42f4b64bb93c250e"><div class="ttname"><a href="ross-types_8h.html#a62f872bac026a0bc42f4b64bb93c250e">map_f</a></div><div class="ttdeci">tw_peid(* map_f)(tw_lpid)</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00073">ross-types.h:73</a></div></div>
<div class="ttc" id="st-instrumentation_8h_html_a2a5b594b0675d6ec442baf16bbacdd47a4bd4814759ab4c480ad9a352ac2b16a6"><div class="ttname"><a href="st-instrumentation_8h.html#a2a5b594b0675d6ec442baf16bbacdd47a4bd4814759ab4c480ad9a352ac2b16a6">VT_STATS</a></div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00234">st-instrumentation.h:234</a></div></div>
<div class="ttc" id="structtw__lp_html_a3e75d9bf7796c16870ad686564ee4c20"><div class="ttname"><a href="structtw__lp.html#a3e75d9bf7796c16870ad686564ee4c20">tw_lp::gid</a></div><div class="ttdeci">tw_lpid gid</div><div class="ttdoc">global LP id </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00306">ross-types.h:306</a></div></div>
<div class="ttc" id="analysis-lp_8c_html_ab8973a3b6409eef24755915fda01a193"><div class="ttname"><a href="analysis-lp_8c.html#ab8973a3b6409eef24755915fda01a193">analysis_lp</a></div><div class="ttdeci">tw_lptype analysis_lp[]</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00288">analysis-lp.c:288</a></div></div>
<div class="ttc" id="st-instrumentation_8h_html_a62e322fd5fc534ed1f671bfcae80f21fa0bfba3b728463b2ee027b64c81b96011"><div class="ttname"><a href="st-instrumentation_8h.html#a62e322fd5fc534ed1f671bfcae80f21fa0bfba3b728463b2ee027b64c81b96011">ANALYSIS_LP</a></div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00043">st-instrumentation.h:43</a></div></div>
<div class="ttc" id="analysis-lp_8h_html"><div class="ttname"><a href="analysis-lp_8h.html">analysis-lp.h</a></div></div>
<div class="ttc" id="ross_8h_html_a650bdf282bba8368dd3325bed7e12abc"><div class="ttname"><a href="ross_8h.html#a650bdf282bba8368dd3325bed7e12abc">TW_STIME_CMP</a></div><div class="ttdeci">#define TW_STIME_CMP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00154">ross.h:154</a></div></div>
<div class="ttc" id="ross-kernel-inline_8h_html_a543cb527662432d81f65c327e5e5f1b0"><div class="ttname"><a href="ross-kernel-inline_8h.html#a543cb527662432d81f65c327e5e5f1b0">tw_now</a></div><div class="ttdeci">static tw_stime tw_now(tw_lp const *lp)</div><div class="ttdef"><b>Definition:</b> <a href="ross-kernel-inline_8h_source.html#l00080">ross-kernel-inline.h:80</a></div></div>
<div class="ttc" id="st-instrumentation_8h_html_a1418b1c212e8b79f85697aa339baa0daa654ff0530bfa70796117e80a97270206"><div class="ttname"><a href="st-instrumentation_8h.html#a1418b1c212e8b79f85697aa339baa0daa654ff0530bfa70796117e80a97270206">MODEL_TYPE</a></div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00053">st-instrumentation.h:53</a></div></div>
<div class="ttc" id="structanalysis__state_html_a87dc37f01bfce6b5f74d05317d33dde2"><div class="ttname"><a href="structanalysis__state.html#a87dc37f01bfce6b5f74d05317d33dde2">analysis_state::lp_list_sim</a></div><div class="ttdeci">tw_lpid * lp_list_sim</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00051">analysis-lp.h:51</a></div></div>
<div class="ttc" id="analysis-lp_8c_html_a2c7b0d1be345dd9f6fc505cccda45958"><div class="ttname"><a href="analysis-lp_8c.html#a2c7b0d1be345dd9f6fc505cccda45958">analysis_commit</a></div><div class="ttdeci">void analysis_commit(analysis_state *s, tw_bf *bf, analysis_msg *m, tw_lp *lp)</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00199">analysis-lp.c:199</a></div></div>
<div class="ttc" id="structanalysis__msg_html"><div class="ttname"><a href="structanalysis__msg.html">analysis_msg</a></div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00019">analysis-lp.h:19</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a3def69f148eaba619b26c898c90687b8"><div class="ttname"><a href="ross-extern_8h.html#a3def69f148eaba619b26c898c90687b8">tw_event_data</a></div><div class="ttdeci">static void * tw_event_data(tw_event *event)</div></div>
<div class="ttc" id="analysis-lp_8c_html_ab8d22436238dae63d882069cad4d637e"><div class="ttname"><a href="analysis-lp_8c.html#ab8d22436238dae63d882069cad4d637e">st_analysis_lp_settype</a></div><div class="ttdeci">void st_analysis_lp_settype(tw_lpid lpid)</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00300">analysis-lp.c:300</a></div></div>
<div class="ttc" id="structtw__statistics_html_ad1861e30cfc3845812bb008f7d419308"><div class="ttname"><a href="structtw__statistics.html#ad1861e30cfc3845812bb008f7d419308">tw_statistics::s_alp_e_rbs</a></div><div class="ttdeci">tw_stat s_alp_e_rbs</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00157">ross-types.h:157</a></div></div>
<div class="ttc" id="structmodel__sample__data_html_a8749fe78d7fd06970185012b9e9f3209"><div class="ttname"><a href="structmodel__sample__data.html#a8749fe78d7fd06970185012b9e9f3209">model_sample_data::lp_data</a></div><div class="ttdeci">void ** lp_data</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00042">analysis-lp.h:42</a></div></div>
<div class="ttc" id="structtw__bf_html"><div class="ttname"><a href="structtw__bf.html">tw_bf</a></div><div class="ttdoc">Reverse Computation Bitfield. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00178">ross-types.h:178</a></div></div>
<div class="ttc" id="st-instrumentation_8c_html_a755f4a9e3b876ebc32861b30f7d90780"><div class="ttname"><a href="st-instrumentation_8c.html#a755f4a9e3b876ebc32861b30f7d90780">g_st_sampling_end</a></div><div class="ttdeci">double g_st_sampling_end</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8c_source.html#l00022">st-instrumentation.c:22</a></div></div>
<div class="ttc" id="structlp__metadata_html_ad7ec46d0315607ba9511e844fd8c0b07"><div class="ttname"><a href="structlp__metadata.html#ad7ec46d0315607ba9511e844fd8c0b07">lp_metadata::kpid</a></div><div class="ttdeci">tw_kpid kpid</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00029">analysis-lp.h:29</a></div></div>
<div class="ttc" id="ross-types_8h_html_aac61902297f5fb4a64df1e5139b14635"><div class="ttname"><a href="ross-types_8h.html#aac61902297f5fb4a64df1e5139b14635">init_f</a></div><div class="ttdeci">void(* init_f)(void *sv, tw_lp *me)</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00072">ross-types.h:72</a></div></div>
<div class="ttc" id="analysis-lp_8c_html_a37b28475849748f0a7b6429a56dc4478"><div class="ttname"><a href="analysis-lp_8c.html#a37b28475849748f0a7b6429a56dc4478">analysis_event_rc</a></div><div class="ttdeci">void analysis_event_rc(analysis_state *s, tw_bf *bf, analysis_msg *m, tw_lp *lp)</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00146">analysis-lp.c:146</a></div></div>
<div class="ttc" id="analysis-lp_8c_html_a59aaa23fb40396f2b16d7a7fc2d25367"><div class="ttname"><a href="analysis-lp_8c.html#a59aaa23fb40396f2b16d7a7fc2d25367">st_create_sample_event</a></div><div class="ttdeci">static void st_create_sample_event(tw_lp *lp)</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8c_source.html#l00267">analysis-lp.c:267</a></div></div>
<div class="ttc" id="ross-types_8h_html_a622b543188d8cf3c6c7d03d4a8f688a8"><div class="ttname"><a href="ross-types_8h.html#a622b543188d8cf3c6c7d03d4a8f688a8">revent_f</a></div><div class="ttdeci">void(* revent_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00078">ross-types.h:78</a></div></div>
<div class="ttc" id="st-instrumentation_8h_html_a6ae8d8f288de23fd6a4d9d3c8a7b296a"><div class="ttname"><a href="st-instrumentation_8h.html#a6ae8d8f288de23fd6a4d9d3c8a7b296a">st_collect_engine_data</a></div><div class="ttdeci">void st_collect_engine_data(tw_pe *me, int col_type)</div><div class="ttdef"><b>Definition:</b> <a href="st-sim-engine_8c_source.html#l00010">st-sim-engine.c:10</a></div></div>
<div class="ttc" id="ross-types_8h_html_a00a92238994982e5b35fdb11bb058b61"><div class="ttname"><a href="ross-types_8h.html#a00a92238994982e5b35fdb11bb058b61">pre_run_f</a></div><div class="ttdeci">void(* pre_run_f)(void *sv, tw_lp *me)</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00076">ross-types.h:76</a></div></div>
<div class="ttc" id="ross_8h_html"><div class="ttname"><a href="ross_8h.html">ross.h</a></div></div>
<div class="ttc" id="structmodel__sample__data_html_a329de5df54c6ea3843a3fe582b63d80d"><div class="ttname"><a href="structmodel__sample__data.html#a329de5df54c6ea3843a3fe582b63d80d">model_sample_data::prev</a></div><div class="ttdeci">model_sample_data * prev</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00039">analysis-lp.h:39</a></div></div>
<div class="ttc" id="st-instrumentation_8c_html_a4775e770faa8c51fc4d08989f610770f"><div class="ttname"><a href="st-instrumentation_8c.html#a4775e770faa8c51fc4d08989f610770f">g_st_model_stats</a></div><div class="ttdeci">int g_st_model_stats</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8c_source.html#l00011">st-instrumentation.c:11</a></div></div>
<div class="ttc" id="structst__model__types_html_a46fdb5687b9f7dc2d08afaa99f0a32f6"><div class="ttname"><a href="structst__model__types.html#a46fdb5687b9f7dc2d08afaa99f0a32f6">st_model_types::sample_revent_fn</a></div><div class="ttdeci">sample_revent_f sample_revent_fn</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00226">st-instrumentation.h:226</a></div></div>
<div class="ttc" id="st-instrumentation_8h_html_a729f18614571dcca273498b46b86d98f"><div class="ttname"><a href="st-instrumentation_8h.html#a729f18614571dcca273498b46b86d98f">seq_analysis</a></div><div class="ttdeci">FILE * seq_analysis</div><div class="ttdef"><b>Definition:</b> <a href="st-stats-buffer_8c_source.html#l00013">st-stats-buffer.c:13</a></div></div>
<div class="ttc" id="structst__model__types_html_a2961fa7f1d81ff16b861217b9b2b75cc"><div class="ttname"><a href="structst__model__types.html#a2961fa7f1d81ff16b861217b9b2b75cc">st_model_types::sample_event_fn</a></div><div class="ttdeci">sample_event_f sample_event_fn</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8h_source.html#l00225">st-instrumentation.h:225</a></div></div>
<div class="ttc" id="structtw__lp_html_a83e9cec9efe1d5202fdcc36598a1aaae"><div class="ttname"><a href="structtw__lp.html#a83e9cec9efe1d5202fdcc36598a1aaae">tw_lp::model_types</a></div><div class="ttdeci">struct st_model_types * model_types</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00322">ross-types.h:322</a></div></div>
<div class="ttc" id="st-instrumentation_8c_html_a6982ecdc2a19a8aea84288e5c94e97b3"><div class="ttname"><a href="st-instrumentation_8c.html#a6982ecdc2a19a8aea84288e5c94e97b3">g_st_vt_interval</a></div><div class="ttdeci">double g_st_vt_interval</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8c_source.html#l00021">st-instrumentation.c:21</a></div></div>
<div class="ttc" id="structtw__lp_html_a9fd32632e5c45a00faf16a6fd0814640"><div class="ttname"><a href="structtw__lp.html#a9fd32632e5c45a00faf16a6fd0814640">tw_lp::pe</a></div><div class="ttdeci">tw_pe * pe</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00308">ross-types.h:308</a></div></div>
<div class="ttc" id="structanalysis__state_html_a6b296674f50801e5f960f70420ca6c0a"><div class="ttname"><a href="structanalysis__state.html#a6b296674f50801e5f960f70420ca6c0a">analysis_state::lp_list</a></div><div class="ttdeci">tw_lpid * lp_list</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00050">analysis-lp.h:50</a></div></div>
<div class="ttc" id="ross_8h_html_a1ec2e3807f66c4270f47acb0e555a519"><div class="ttname"><a href="ross_8h.html#a1ec2e3807f66c4270f47acb0e555a519">tw_peid</a></div><div class="ttdeci">unsigned long tw_peid</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00147">ross.h:147</a></div></div>
<div class="ttc" id="structtw__kp_html_afb056d26713ffb46913315b0d2f2651b"><div class="ttname"><a href="structtw__kp.html#afb056d26713ffb46913315b0d2f2651b">tw_kp::id</a></div><div class="ttdeci">tw_kpid id</div><div class="ttdoc">ID number, otherwise its not available to the app. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00341">ross-types.h:341</a></div></div>
<div class="ttc" id="structtw__lp_html_a34fb8e673f23705156b2473503e8a2d5"><div class="ttname"><a href="structtw__lp.html#a34fb8e673f23705156b2473503e8a2d5">tw_lp::cur_state</a></div><div class="ttdeci">void * cur_state</div><div class="ttdoc">Current application LP data. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00315">ross-types.h:315</a></div></div>
<div class="ttc" id="structanalysis__state_html_a409d430940c80d1ff1e9353fb4d0ebad"><div class="ttname"><a href="structanalysis__state.html#a409d430940c80d1ff1e9353fb4d0ebad">analysis_state::analysis_id</a></div><div class="ttdeci">tw_lpid analysis_id</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00047">analysis-lp.h:47</a></div></div>
<div class="ttc" id="structmodel__sample__data_html_a315213a0e1e7113a7d244196532963e3"><div class="ttname"><a href="structmodel__sample__data.html#a315213a0e1e7113a7d244196532963e3">model_sample_data::next</a></div><div class="ttdeci">model_sample_data * next</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00040">analysis-lp.h:40</a></div></div>
<div class="ttc" id="ross-extern_8h_html_ad057802273cd99b0e039da1ba15080ac"><div class="ttname"><a href="ross-extern_8h.html#ad057802273cd99b0e039da1ba15080ac">tw_event_send</a></div><div class="ttdeci">void tw_event_send(tw_event *event)</div><div class="ttdef"><b>Definition:</b> <a href="tw-event_8c_source.html#l00009">tw-event.c:9</a></div></div>
<div class="ttc" id="specialized-lps_8c_html_abed0f5fb27fb2a268739d215ef22180e"><div class="ttname"><a href="specialized-lps_8c.html#abed0f5fb27fb2a268739d215ef22180e">g_st_sample_count</a></div><div class="ttdeci">int g_st_sample_count</div><div class="ttdef"><b>Definition:</b> <a href="specialized-lps_8c_source.html#l00013">specialized-lps.c:13</a></div></div>
<div class="ttc" id="structtw__statistics_html_a1db8c3a6135984960c5b7da410770cf5"><div class="ttname"><a href="structtw__statistics.html#a1db8c3a6135984960c5b7da410770cf5">tw_statistics::s_alp_nevent_processed</a></div><div class="ttdeci">tw_stat s_alp_nevent_processed</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00156">ross-types.h:156</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a4a237c68db5a0325e986d3710088d427"><div class="ttname"><a href="ross-extern_8h.html#a4a237c68db5a0325e986d3710088d427">g_tw_nkp</a></div><div class="ttdeci">tw_kpid g_tw_nkp</div><div class="ttdef"><b>Definition:</b> <a href="ross-global_8c_source.html#l00025">ross-global.c:25</a></div></div>
<div class="ttc" id="structlp__metadata_html_a7630858a858eb1e11c17758be11fcf0e"><div class="ttname"><a href="structlp__metadata.html#a7630858a858eb1e11c17758be11fcf0e">lp_metadata::sample_sz</a></div><div class="ttdeci">int sample_sz</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00033">analysis-lp.h:33</a></div></div>
<div class="ttc" id="structtw__pe_html_a8a57f2123eddf6a195d82ecc781093e6"><div class="ttname"><a href="structtw__pe.html#a8a57f2123eddf6a195d82ecc781093e6">tw_pe::id</a></div><div class="ttdeci">tw_peid id</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00376">ross-types.h:376</a></div></div>
<div class="ttc" id="ross-kernel-inline_8h_html_a3e5591d29e9db9c6a1a1cc19ed55feec"><div class="ttname"><a href="ross-kernel-inline_8h.html#a3e5591d29e9db9c6a1a1cc19ed55feec">tw_getlocal_lp</a></div><div class="ttdeci">static tw_lp * tw_getlocal_lp(tw_lpid gid)</div><div class="ttdef"><b>Definition:</b> <a href="ross-kernel-inline_8h_source.html#l00009">ross-kernel-inline.h:9</a></div></div>
<div class="ttc" id="structanalysis__state_html_adc89f92c80e034deb1dd1c3cb82363fd"><div class="ttname"><a href="structanalysis__state.html#adc89f92c80e034deb1dd1c3cb82363fd">analysis_state::model_samples_tail</a></div><div class="ttdeci">model_sample_data * model_samples_tail</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00054">analysis-lp.h:54</a></div></div>
<div class="ttc" id="st-instrumentation_8c_html_aa9d73558c451caac8d15fdbff04f42cc"><div class="ttname"><a href="st-instrumentation_8c.html#aa9d73558c451caac8d15fdbff04f42cc">g_st_disable_out</a></div><div class="ttdeci">int g_st_disable_out</div><div class="ttdef"><b>Definition:</b> <a href="st-instrumentation_8c_source.html#l00009">st-instrumentation.c:9</a></div></div>
<div class="ttc" id="structlp__metadata_html_aec297d31062cfc94c30f4e46162c9845"><div class="ttname"><a href="structlp__metadata.html#aec297d31062cfc94c30f4e46162c9845">lp_metadata::ts</a></div><div class="ttdeci">tw_stime ts</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00031">analysis-lp.h:31</a></div></div>
<div class="ttc" id="structanalysis__state_html_a9eb7f15edd1529ce5319bf91b3110266"><div class="ttname"><a href="structanalysis__state.html#a9eb7f15edd1529ce5319bf91b3110266">analysis_state::model_samples_head</a></div><div class="ttdeci">model_sample_data * model_samples_head</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00052">analysis-lp.h:52</a></div></div>
<div class="ttc" id="ross-types_8h_html_accdac06fd09ac539061af06d529fe467"><div class="ttname"><a href="ross-types_8h.html#accdac06fd09ac539061af06d529fe467">final_f</a></div><div class="ttdeci">void(* final_f)(void *sv, tw_lp *me)</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00080">ross-types.h:80</a></div></div>
<div class="ttc" id="ross-types_8h_html_abf9562d002530fb837843fd3f237dcd5"><div class="ttname"><a href="ross-types_8h.html#abf9562d002530fb837843fd3f237dcd5">commit_f</a></div><div class="ttdeci">void(* commit_f)(void *sv, tw_bf *cv, void *msg, tw_lp *me)</div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00079">ross-types.h:79</a></div></div>
<div class="ttc" id="ross-extern_8h_html_a445b1ed30cd2e8ef1f837e782a339a70"><div class="ttname"><a href="ross-extern_8h.html#a445b1ed30cd2e8ef1f837e782a339a70">tw_calloc</a></div><div class="ttdeci">void * tw_calloc(const char *file, int line, const char *for_who, size_t e_sz, size_t n)</div><div class="ttdef"><b>Definition:</b> <a href="tw-util_8c_source.html#l00203">tw-util.c:203</a></div></div>
<div class="ttc" id="ross_8h_html_a096f73feb08316896d644277b486c9ea"><div class="ttname"><a href="ross_8h.html#a096f73feb08316896d644277b486c9ea">TW_STIME_DBL</a></div><div class="ttdeci">#define TW_STIME_DBL(x)</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00153">ross.h:153</a></div></div>
<div class="ttc" id="ross-inline_8h_html_a6e55304c545600c2bb996fa70dd43f05"><div class="ttname"><a href="ross-inline_8h.html#a6e55304c545600c2bb996fa70dd43f05">tw_event_new</a></div><div class="ttdeci">static tw_event * tw_event_new(tw_lpid dest_gid, tw_stime offset_ts, tw_lp *sender)</div><div class="ttdef"><b>Definition:</b> <a href="ross-inline_8h_source.html#l00040">ross-inline.h:40</a></div></div>
<div class="ttc" id="structlp__metadata_html_a04c8225b86d7d53b5335b8b3a6207430"><div class="ttname"><a href="structlp__metadata.html#a04c8225b86d7d53b5335b8b3a6207430">lp_metadata::lpid</a></div><div class="ttdeci">tw_lpid lpid</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00028">analysis-lp.h:28</a></div></div>
<div class="ttc" id="structtw__lp_html"><div class="ttname"><a href="structtw__lp.html">tw_lp</a></div><div class="ttdoc">LP State Structure. </div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00304">ross-types.h:304</a></div></div>
<div class="ttc" id="ross-types_8h_html_abea764c61c75c56008ccf665a71246fda6b834d43476553e583e0fde6578c82f0"><div class="ttname"><a href="ross-types_8h.html#abea764c61c75c56008ccf665a71246fda6b834d43476553e583e0fde6578c82f0">SEQUENTIAL</a></div><div class="ttdef"><b>Definition:</b> <a href="ross-types_8h_source.html#l00028">ross-types.h:28</a></div></div>
<div class="ttc" id="structanalysis__msg_html_ab0734d7472194e3110f01c06ec222803"><div class="ttname"><a href="structanalysis__msg.html#ab0734d7472194e3110f01c06ec222803">analysis_msg::timestamp</a></div><div class="ttdeci">tw_stime timestamp</div><div class="ttdef"><b>Definition:</b> <a href="analysis-lp_8h_source.html#l00022">analysis-lp.h:22</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
